
import { createRouter, createWebHistory } from "vue-router";
import type { RouteRecordRaw } from "vue-router";

// 定义组件类型
// type ComponentLoader = () => Promise<typeof import("vue")>;
 
// 2. 配置路由
const routes: Array<RouteRecordRaw> = [
  {
    path: "/login",
    component: () => import("../views/Login.vue"),
  },
  {
    path: "/",
    component: () => import("../views/Home.vue"),
  },
];
const router = createRouter({
  history: createWebHistory(),
  routes,
});
 
export default router;